/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package edu.uoc.tdp.pac4.only5.manager;

import edu.uoc.tdp.pac4.only5.exceptions.EespaisDatabaseException;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.Statement;

/**
 *
 * @author Josep
 * @author Gerard
 */
public interface DatabaseConnectionManager {
    
    void openConnection() throws EespaisDatabaseException;

    Statement createStatement() throws EespaisDatabaseException;

    PreparedStatement createPreparedStatement(String prepStatement) throws EespaisDatabaseException;

    void closeConnection() throws EespaisDatabaseException;

    Connection getConnection();
    
    void commit()throws EespaisDatabaseException;
    
    void rollback()throws EespaisDatabaseException;
    
    void setAutoCommit(boolean autoCommit) throws EespaisDatabaseException;

}
